{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "6c591f54",
   "metadata": {},
   "source": [
    "# 统计低于预算的投标中，所有投标的供应商中评分被推荐且排名第一的占比"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "fe09d9a0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>project_code</th>\n",
       "      <th>project_name</th>\n",
       "      <th>project_money</th>\n",
       "      <th>specie_type_name</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stpr_id</th>\n",
       "      <th>bundle_code</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>16aebe0a-1bdf-4022-b2bf-0284c1a18423</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>2080000.0</td>\n",
       "      <td>货物类</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>f7e67994-24a7-470c-8c8c-2bb14d4447e9</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]223号</td>\n",
       "      <td>中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目</td>\n",
       "      <td>4275000.0</td>\n",
       "      <td>货物类</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>dcca20ed-4aea-4b4f-befe-188f226945c7</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1045号</td>\n",
       "      <td>中山大学大气科学学院比较行星学综合观测平台：1米口径望远镜采购项目</td>\n",
       "      <td>6620000.0</td>\n",
       "      <td>货物类</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>497a5171-dac9-40ec-86d7-6b661dc05419</th>\n",
       "      <th>1</th>\n",
       "      <td>平均值法测试项目11.1</td>\n",
       "      <td>中山大学2022年南校园新建水泵房配置设施建设与办公用房改造工程(转竞争性磋商)</td>\n",
       "      <td>1000000.0</td>\n",
       "      <td>工程类</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20153f94-a8ed-4726-ae45-209db635c34b</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2023]124号</td>\n",
       "      <td>中山大学广州校区南校园与东校园教学楼空调更换采购项目</td>\n",
       "      <td>2212900.0</td>\n",
       "      <td>货物类</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>00da2de8-cd86-4b39-973f-589bbb92d6ce</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]927号</td>\n",
       "      <td>中山大学材料学院超高温综合热分析仪采购项目</td>\n",
       "      <td>1850000.0</td>\n",
       "      <td>货物类</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>afa4fc62-ba82-40f7-b314-8b3a11f4693e</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1346号</td>\n",
       "      <td>中山大学化学学院超高效液相色谱-三重四极杆质谱联用仪采购项目</td>\n",
       "      <td>2500000.0</td>\n",
       "      <td>货物类</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0e6bdb27-3de0-464f-a26e-44e251bc20b1</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]162号</td>\n",
       "      <td>中山大学2022年南校园部分学生宿舍热水系统维修更换采购项目</td>\n",
       "      <td>1477013.8</td>\n",
       "      <td>货物类</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>f87ef8ce-8552-4c2f-bb71-9d39309e847b</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>1720000.0</td>\n",
       "      <td>货物类</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>366b7281-a8fd-4a2c-b895-fba8af4f4200</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>2600000.0</td>\n",
       "      <td>货物类</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1191 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                       project_code  \\\n",
       "stpr_id                              bundle_code                      \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            中大招（货）[2022]1092号   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1             中大招（货）[2022]223号   \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1            中大招（货）[2022]1045号   \n",
       "497a5171-dac9-40ec-86d7-6b661dc05419 1                 平均值法测试项目11.1   \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1             中大招（货）[2023]124号   \n",
       "...                                                             ...   \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1             中大招（货）[2022]927号   \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1            中大招（货）[2022]1346号   \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1             中大招（货）[2022]162号   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1            中大招（货）[2022]1276号   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1             中大招（货）[2022]849号   \n",
       "\n",
       "                                                                              project_name  \\\n",
       "stpr_id                              bundle_code                                             \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                            中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                       中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目   \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1                   中山大学大气科学学院比较行星学综合观测平台：1米口径望远镜采购项目   \n",
       "497a5171-dac9-40ec-86d7-6b661dc05419 1            中山大学2022年南校园新建水泵房配置设施建设与办公用房改造工程(转竞争性磋商)   \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1                          中山大学广州校区南校园与东校园教学楼空调更换采购项目   \n",
       "...                                                                                    ...   \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1                               中山大学材料学院超高温综合热分析仪采购项目   \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1                      中山大学化学学院超高效液相色谱-三重四极杆质谱联用仪采购项目   \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1                      中山大学2022年南校园部分学生宿舍热水系统维修更换采购项目   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                        中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                 中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "\n",
       "                                                  project_money  \\\n",
       "stpr_id                              bundle_code                  \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                2080000.0   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                4275000.0   \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1                6620000.0   \n",
       "497a5171-dac9-40ec-86d7-6b661dc05419 1                1000000.0   \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1                2212900.0   \n",
       "...                                                         ...   \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1                1850000.0   \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1                2500000.0   \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1                1477013.8   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                1720000.0   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                2600000.0   \n",
       "\n",
       "                                                 specie_type_name  \n",
       "stpr_id                              bundle_code                   \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                        货物类  \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                        货物类  \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1                        货物类  \n",
       "497a5171-dac9-40ec-86d7-6b661dc05419 1                        工程类  \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1                        货物类  \n",
       "...                                                           ...  \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1                        货物类  \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1                        货物类  \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1                        货物类  \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                        货物类  \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                        货物类  \n",
       "\n",
       "[1191 rows x 4 columns]"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "\n",
    "#读取 projectInfo\n",
    "projectInfo= pd.read_csv('d:/data/bidding/tdz_zbs_project.csv',usecols=['stpr_id','project_code','project_name','bundle_code','project_money','specie_type_name'])\n",
    "# projectInfo['idx'] = projectInfo['stpr_id']+'_'+projectInfo['bundle_code'].astype(str)\n",
    "projectInfo=projectInfo.set_index(['stpr_id','bundle_code'])\n",
    "projectInfo"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "376005eb",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>project_name</th>\n",
       "      <th>project_code</th>\n",
       "      <th>supply_name</th>\n",
       "      <th>good_name</th>\n",
       "      <th>makeFactory</th>\n",
       "      <th>amount</th>\n",
       "      <th>spec</th>\n",
       "      <th>bid_quote</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stpr_id</th>\n",
       "      <th>bundle_code</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>21b1b2a7-c851-45c5-b578-0da3f149686c</th>\n",
       "      <th>1</th>\n",
       "      <td>中山大学物理学院适用于低波数微区拉曼光谱系统的无液氦强磁场显微低温系统采购项目</td>\n",
       "      <td>中大招（货）[2022]686号</td>\n",
       "      <td>东方国科（北京）进出口有限公司</td>\n",
       "      <td>Quantum Design</td>\n",
       "      <td>Quantum Design, Inc.</td>\n",
       "      <td>1.0</td>\n",
       "      <td>OptiCool</td>\n",
       "      <td>2868422.80</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>dff45f53-088e-4c57-8d3d-98fd2d062a52</th>\n",
       "      <th>1</th>\n",
       "      <td>中山大学医学院神经细胞长时程成像与解析系统采购项目</td>\n",
       "      <td>中大招（货）[2022]1110号</td>\n",
       "      <td>苏州达泊生物科技有限公司</td>\n",
       "      <td>Labmaker</td>\n",
       "      <td>LabMaker GmbH</td>\n",
       "      <td>1.0</td>\n",
       "      <td>V1.2</td>\n",
       "      <td>1149985.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>595efb3a-587d-4993-8536-d130356eb252</th>\n",
       "      <th>1</th>\n",
       "      <td>中山大学天琴中心波长计采购项目</td>\n",
       "      <td>中大招（货）[2022]772号</td>\n",
       "      <td>武汉珺瑜测控技术有限公司</td>\n",
       "      <td>HIGHFINESSE</td>\n",
       "      <td>HIGHFINESSE GmbH</td>\n",
       "      <td>2.0</td>\n",
       "      <td>WS7-30 &amp; WS8-2</td>\n",
       "      <td>1902715.10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4314773d-1b3c-475d-b067-1b26944331f6</th>\n",
       "      <th>1</th>\n",
       "      <td>中山大学2023年广州校区东校园垃圾清运服务采购项目</td>\n",
       "      <td>中大招（服）[2022]235号</td>\n",
       "      <td>广州市桦城物业管理有限公司</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1873658.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>ca03c76d-172e-4260-b085-e48977c0e47d</th>\n",
       "      <th>1</th>\n",
       "      <td>中山大学2022年珠海校区榕园配电房改造工程</td>\n",
       "      <td>中大招（工）[2022]012号</td>\n",
       "      <td>广东民升建设工程有限公司</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3023494.52</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>61503b5b-cd8c-468d-b217-b758372e8afc</th>\n",
       "      <th>1</th>\n",
       "      <td>中山大学化学学院催化及反应动力学测试系统采购项目</td>\n",
       "      <td>中大招（货）[2022]958号</td>\n",
       "      <td>佛山菲斯特科技有限公司</td>\n",
       "      <td>ADANI</td>\n",
       "      <td>LINEV ADANI</td>\n",
       "      <td>1.0</td>\n",
       "      <td>SPINSCAN</td>\n",
       "      <td>2397600.00</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8b1308be-be6f-4eb3-ab14-7173df3301b7</th>\n",
       "      <th>1</th>\n",
       "      <td>中山大学2021年东校园化学学院院史馆及学术交流中心建设工程</td>\n",
       "      <td>中大招（工）[2022]003号</td>\n",
       "      <td>广东高达建设工程有限公司</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1183883.41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <th>1</th>\n",
       "      <td>中山大学招标采购系统</td>\n",
       "      <td>CG202108020000</td>\n",
       "      <td>闪购软件公司</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>5.0</td>\n",
       "      <td>2</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>55d53a3e-74b5-4149-b248-21c56e51fa91</th>\n",
       "      <th>1</th>\n",
       "      <td>中山大学2021年东校园管理学院人文社科楼一至四楼装修改造工程</td>\n",
       "      <td>中大招（工）[2022]020号</td>\n",
       "      <td>广东宇晟建设工程有限公司</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4023758.62</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <th>1</th>\n",
       "      <td>中山大学招标采购系统</td>\n",
       "      <td>CG202108020000</td>\n",
       "      <td>闪购软件公司</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>5.0</td>\n",
       "      <td>2</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>8988 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                                             project_name  \\\n",
       "stpr_id                              bundle_code                                            \n",
       "21b1b2a7-c851-45c5-b578-0da3f149686c 1            中山大学物理学院适用于低波数微区拉曼光谱系统的无液氦强磁场显微低温系统采购项目   \n",
       "dff45f53-088e-4c57-8d3d-98fd2d062a52 1                          中山大学医学院神经细胞长时程成像与解析系统采购项目   \n",
       "595efb3a-587d-4993-8536-d130356eb252 1                                    中山大学天琴中心波长计采购项目   \n",
       "4314773d-1b3c-475d-b067-1b26944331f6 1                         中山大学2023年广州校区东校园垃圾清运服务采购项目   \n",
       "ca03c76d-172e-4260-b085-e48977c0e47d 1                             中山大学2022年珠海校区榕园配电房改造工程   \n",
       "...                                                                                   ...   \n",
       "61503b5b-cd8c-468d-b217-b758372e8afc 1                           中山大学化学学院催化及反应动力学测试系统采购项目   \n",
       "8b1308be-be6f-4eb3-ab14-7173df3301b7 1                     中山大学2021年东校园化学学院院史馆及学术交流中心建设工程   \n",
       "1                                    1                                         中山大学招标采购系统   \n",
       "55d53a3e-74b5-4149-b248-21c56e51fa91 1                    中山大学2021年东校园管理学院人文社科楼一至四楼装修改造工程   \n",
       "1                                    1                                         中山大学招标采购系统   \n",
       "\n",
       "                                                       project_code  \\\n",
       "stpr_id                              bundle_code                      \n",
       "21b1b2a7-c851-45c5-b578-0da3f149686c 1             中大招（货）[2022]686号   \n",
       "dff45f53-088e-4c57-8d3d-98fd2d062a52 1            中大招（货）[2022]1110号   \n",
       "595efb3a-587d-4993-8536-d130356eb252 1             中大招（货）[2022]772号   \n",
       "4314773d-1b3c-475d-b067-1b26944331f6 1             中大招（服）[2022]235号   \n",
       "ca03c76d-172e-4260-b085-e48977c0e47d 1             中大招（工）[2022]012号   \n",
       "...                                                             ...   \n",
       "61503b5b-cd8c-468d-b217-b758372e8afc 1             中大招（货）[2022]958号   \n",
       "8b1308be-be6f-4eb3-ab14-7173df3301b7 1             中大招（工）[2022]003号   \n",
       "1                                    1               CG202108020000   \n",
       "55d53a3e-74b5-4149-b248-21c56e51fa91 1             中大招（工）[2022]020号   \n",
       "1                                    1               CG202108020000   \n",
       "\n",
       "                                                      supply_name  \\\n",
       "stpr_id                              bundle_code                    \n",
       "21b1b2a7-c851-45c5-b578-0da3f149686c 1            东方国科（北京）进出口有限公司   \n",
       "dff45f53-088e-4c57-8d3d-98fd2d062a52 1               苏州达泊生物科技有限公司   \n",
       "595efb3a-587d-4993-8536-d130356eb252 1               武汉珺瑜测控技术有限公司   \n",
       "4314773d-1b3c-475d-b067-1b26944331f6 1              广州市桦城物业管理有限公司   \n",
       "ca03c76d-172e-4260-b085-e48977c0e47d 1               广东民升建设工程有限公司   \n",
       "...                                                           ...   \n",
       "61503b5b-cd8c-468d-b217-b758372e8afc 1                佛山菲斯特科技有限公司   \n",
       "8b1308be-be6f-4eb3-ab14-7173df3301b7 1               广东高达建设工程有限公司   \n",
       "1                                    1                     闪购软件公司   \n",
       "55d53a3e-74b5-4149-b248-21c56e51fa91 1               广东宇晟建设工程有限公司   \n",
       "1                                    1                     闪购软件公司   \n",
       "\n",
       "                                                       good_name  \\\n",
       "stpr_id                              bundle_code                   \n",
       "21b1b2a7-c851-45c5-b578-0da3f149686c 1            Quantum Design   \n",
       "dff45f53-088e-4c57-8d3d-98fd2d062a52 1                  Labmaker   \n",
       "595efb3a-587d-4993-8536-d130356eb252 1               HIGHFINESSE   \n",
       "4314773d-1b3c-475d-b067-1b26944331f6 1                       NaN   \n",
       "ca03c76d-172e-4260-b085-e48977c0e47d 1                       NaN   \n",
       "...                                                          ...   \n",
       "61503b5b-cd8c-468d-b217-b758372e8afc 1                     ADANI   \n",
       "8b1308be-be6f-4eb3-ab14-7173df3301b7 1                       NaN   \n",
       "1                                    1                         1   \n",
       "55d53a3e-74b5-4149-b248-21c56e51fa91 1                       NaN   \n",
       "1                                    1                         1   \n",
       "\n",
       "                                                           makeFactory  \\\n",
       "stpr_id                              bundle_code                         \n",
       "21b1b2a7-c851-45c5-b578-0da3f149686c 1            Quantum Design, Inc.   \n",
       "dff45f53-088e-4c57-8d3d-98fd2d062a52 1                   LabMaker GmbH   \n",
       "595efb3a-587d-4993-8536-d130356eb252 1                HIGHFINESSE GmbH   \n",
       "4314773d-1b3c-475d-b067-1b26944331f6 1                             NaN   \n",
       "ca03c76d-172e-4260-b085-e48977c0e47d 1                             NaN   \n",
       "...                                                                ...   \n",
       "61503b5b-cd8c-468d-b217-b758372e8afc 1                     LINEV ADANI   \n",
       "8b1308be-be6f-4eb3-ab14-7173df3301b7 1                             NaN   \n",
       "1                                    1                               3   \n",
       "55d53a3e-74b5-4149-b248-21c56e51fa91 1                             NaN   \n",
       "1                                    1                               3   \n",
       "\n",
       "                                                  amount            spec  \\\n",
       "stpr_id                              bundle_code                           \n",
       "21b1b2a7-c851-45c5-b578-0da3f149686c 1               1.0        OptiCool   \n",
       "dff45f53-088e-4c57-8d3d-98fd2d062a52 1               1.0            V1.2   \n",
       "595efb3a-587d-4993-8536-d130356eb252 1               2.0  WS7-30 & WS8-2   \n",
       "4314773d-1b3c-475d-b067-1b26944331f6 1               NaN             NaN   \n",
       "ca03c76d-172e-4260-b085-e48977c0e47d 1               NaN             NaN   \n",
       "...                                                  ...             ...   \n",
       "61503b5b-cd8c-468d-b217-b758372e8afc 1               1.0        SPINSCAN   \n",
       "8b1308be-be6f-4eb3-ab14-7173df3301b7 1               NaN             NaN   \n",
       "1                                    1               5.0               2   \n",
       "55d53a3e-74b5-4149-b248-21c56e51fa91 1               NaN             NaN   \n",
       "1                                    1               5.0               2   \n",
       "\n",
       "                                                   bid_quote  \n",
       "stpr_id                              bundle_code              \n",
       "21b1b2a7-c851-45c5-b578-0da3f149686c 1            2868422.80  \n",
       "dff45f53-088e-4c57-8d3d-98fd2d062a52 1            1149985.00  \n",
       "595efb3a-587d-4993-8536-d130356eb252 1            1902715.10  \n",
       "4314773d-1b3c-475d-b067-1b26944331f6 1            1873658.00  \n",
       "ca03c76d-172e-4260-b085-e48977c0e47d 1            3023494.52  \n",
       "...                                                      ...  \n",
       "61503b5b-cd8c-468d-b217-b758372e8afc 1            2397600.00  \n",
       "8b1308be-be6f-4eb3-ab14-7173df3301b7 1            1183883.41  \n",
       "1                                    1                   NaN  \n",
       "55d53a3e-74b5-4149-b248-21c56e51fa91 1            4023758.62  \n",
       "1                                    1                   NaN  \n",
       "\n",
       "[8988 rows x 8 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bidInfo = pd.read_csv('d:/data/bidding/tdz_tbs_open_bid.csv',usecols=['stpr_id','project_name','project_code','bundle_code','supply_name','good_name','makeFactory','spec','bid_quote','amount'])\n",
    "# bidInfo['idx'] = bidInfo['stpr_id']+'_'+bidInfo['bundle_code'].astype(str)\n",
    "bidInfo = bidInfo.set_index(['stpr_id','bundle_code'])\n",
    "bidInfo"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "f6a98c41",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>supply_name</th>\n",
       "      <th>ranking</th>\n",
       "      <th>flag</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stpr_id</th>\n",
       "      <th>bundle_code</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>e645b28a-764a-42bb-ac2c-72cc4d8e303c</th>\n",
       "      <th>1</th>\n",
       "      <td>科近泰基新技术有限公司</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5fa6401a-6c0c-4814-ac08-6c2bc121fb4b</th>\n",
       "      <th>1</th>\n",
       "      <td>广州市中谦建设工程有限公司</td>\n",
       "      <td>75</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>c555199e-8ce5-42c0-8924-87922232383a</th>\n",
       "      <th>1</th>\n",
       "      <td>广东省本江水利建设有限公司</td>\n",
       "      <td>107</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41447394-5834-429b-b0b2-7e8c8443f307</th>\n",
       "      <th>1</th>\n",
       "      <td>安徽蓝科信息科技有限公司</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2f5e4c08-0119-4fde-8514-62fc41fb2fd2</th>\n",
       "      <th>1</th>\n",
       "      <td>广东骏森建设工程有限公司</td>\n",
       "      <td>126</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>61503b5b-cd8c-468d-b217-b758372e8afc</th>\n",
       "      <th>1</th>\n",
       "      <td>深圳金玛维基科贸有限公司</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56b95066-d129-447b-a910-bff9251ce06e</th>\n",
       "      <th>1</th>\n",
       "      <td>北京倬实科技有限公司</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1b674ad4-448e-461a-8eb3-0b9eaa52c093</th>\n",
       "      <th>1</th>\n",
       "      <td>广东宏业建设工程有限公司</td>\n",
       "      <td>169</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>431acdef-28ae-41c1-b06d-03f09fcd81ba</th>\n",
       "      <th>2</th>\n",
       "      <td>中国图书进出口（集团）有限公司</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>f4b777e8-51b5-4795-88a1-b1e452c134bd</th>\n",
       "      <th>1</th>\n",
       "      <td>南京迪橹科学仪器有限公司</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>9525 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                      supply_name  ranking  \\\n",
       "stpr_id                              bundle_code                             \n",
       "e645b28a-764a-42bb-ac2c-72cc4d8e303c 1                科近泰基新技术有限公司        1   \n",
       "5fa6401a-6c0c-4814-ac08-6c2bc121fb4b 1              广州市中谦建设工程有限公司       75   \n",
       "c555199e-8ce5-42c0-8924-87922232383a 1              广东省本江水利建设有限公司      107   \n",
       "41447394-5834-429b-b0b2-7e8c8443f307 1               安徽蓝科信息科技有限公司        1   \n",
       "2f5e4c08-0119-4fde-8514-62fc41fb2fd2 1               广东骏森建设工程有限公司      126   \n",
       "...                                                           ...      ...   \n",
       "61503b5b-cd8c-468d-b217-b758372e8afc 1               深圳金玛维基科贸有限公司        1   \n",
       "56b95066-d129-447b-a910-bff9251ce06e 1                 北京倬实科技有限公司        3   \n",
       "1b674ad4-448e-461a-8eb3-0b9eaa52c093 1               广东宏业建设工程有限公司      169   \n",
       "431acdef-28ae-41c1-b06d-03f09fcd81ba 2            中国图书进出口（集团）有限公司        2   \n",
       "f4b777e8-51b5-4795-88a1-b1e452c134bd 1               南京迪橹科学仪器有限公司        1   \n",
       "\n",
       "                                                  flag  \n",
       "stpr_id                              bundle_code        \n",
       "e645b28a-764a-42bb-ac2c-72cc4d8e303c 1               1  \n",
       "5fa6401a-6c0c-4814-ac08-6c2bc121fb4b 1               0  \n",
       "c555199e-8ce5-42c0-8924-87922232383a 1               0  \n",
       "41447394-5834-429b-b0b2-7e8c8443f307 1               1  \n",
       "2f5e4c08-0119-4fde-8514-62fc41fb2fd2 1               0  \n",
       "...                                                ...  \n",
       "61503b5b-cd8c-468d-b217-b758372e8afc 1               1  \n",
       "56b95066-d129-447b-a910-bff9251ce06e 1               1  \n",
       "1b674ad4-448e-461a-8eb3-0b9eaa52c093 1               0  \n",
       "431acdef-28ae-41c1-b06d-03f09fcd81ba 2               1  \n",
       "f4b777e8-51b5-4795-88a1-b1e452c134bd 1               1  \n",
       "\n",
       "[9525 rows x 3 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bidResult = pd.read_csv('d:/data/bidding/tdz_bsr_score_result.csv',usecols=['stpr_id','bundle_code','supply_name','ranking','flag'])\n",
    "# bidResult['idx'] = bidResult['stpr_id']+'_'+bidResult['bundle_code'].astype(str)\n",
    "bidResult = bidResult.set_index(['stpr_id','bundle_code'])\n",
    "bidResult"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "43c7368a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>project_code_x</th>\n",
       "      <th>project_name_x</th>\n",
       "      <th>project_money</th>\n",
       "      <th>specie_type_name</th>\n",
       "      <th>project_name_y</th>\n",
       "      <th>project_code_y</th>\n",
       "      <th>supply_name</th>\n",
       "      <th>good_name</th>\n",
       "      <th>makeFactory</th>\n",
       "      <th>amount</th>\n",
       "      <th>spec</th>\n",
       "      <th>bid_quote</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stpr_id</th>\n",
       "      <th>bundle_code</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">16aebe0a-1bdf-4022-b2bf-0284c1a18423</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>2080000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>广州格卢瑞生命科学有限公司</td>\n",
       "      <td>数字病理玻片扫描仪（荧光）</td>\n",
       "      <td>徕卡显微系统（上海）贸易有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>Aperio Versa 200</td>\n",
       "      <td>2076800.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>2080000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>深圳市贝克生物科技有限公司</td>\n",
       "      <td>Panovue</td>\n",
       "      <td>佰诺全景生物技术（北京）有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>PD One</td>\n",
       "      <td>2079000.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>2080000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>广州睿贝医学科技有限公司</td>\n",
       "      <td>数字病理玻片扫描仪（荧光)</td>\n",
       "      <td>宁波江丰生物信息技术有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>KF-FL-120</td>\n",
       "      <td>2078500.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">f7e67994-24a7-470c-8c8c-2bb14d4447e9</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]223号</td>\n",
       "      <td>中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目</td>\n",
       "      <td>4275000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目</td>\n",
       "      <td>中大招（货）[2022]223号</td>\n",
       "      <td>湖南矩阵电子科技有限公司</td>\n",
       "      <td>矩阵电子</td>\n",
       "      <td>湖南矩阵电子科技有限公司</td>\n",
       "      <td>30.0</td>\n",
       "      <td>GNS-YZ100/GNS8110/GNS7632/GNS-JS210/GNS-ZH400/...</td>\n",
       "      <td>4212500.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]223号</td>\n",
       "      <td>中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目</td>\n",
       "      <td>4275000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目</td>\n",
       "      <td>中大招（货）[2022]223号</td>\n",
       "      <td>北京航天河科技发展有限公司</td>\n",
       "      <td>宇焕</td>\n",
       "      <td>北京航天河科技发展有限公司</td>\n",
       "      <td>30.0</td>\n",
       "      <td>HTH1001、HTH2010、HTH3002、HTH4010、HTH4020、HTH4030</td>\n",
       "      <td>4154000.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">f87ef8ce-8552-4c2f-bb71-9d39309e847b</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>1720000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>广州大苗科技有限公司</td>\n",
       "      <td>凌视科技</td>\n",
       "      <td>天津凌视科技有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>VS10000</td>\n",
       "      <td>1715800.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>1720000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>广东省中科进出口有限公司</td>\n",
       "      <td>Luminex</td>\n",
       "      <td>Luminex Corporate</td>\n",
       "      <td>1.0</td>\n",
       "      <td>Cellstream</td>\n",
       "      <td>1711500.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">366b7281-a8fd-4a2c-b895-fba8af4f4200</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>2600000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>北京实创德激光科技有限公司</td>\n",
       "      <td>北京实创德</td>\n",
       "      <td>北京实创德激光科技有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>SCD01A-01</td>\n",
       "      <td>2598000.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>2600000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>宁波宏太科真空科技有限公司</td>\n",
       "      <td>宁波宏太科真空科技有限公司</td>\n",
       "      <td>宁波宏太科真空科技有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>HCKJ-620-A型</td>\n",
       "      <td>2600000.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>2600000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>北京维开科技有限公司</td>\n",
       "      <td>磁控溅射系统</td>\n",
       "      <td>北京维开科技有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>M600</td>\n",
       "      <td>2595000.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>9092 rows × 12 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                     project_code_x  \\\n",
       "stpr_id                              bundle_code                      \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            中大招（货）[2022]1092号   \n",
       "                                     1            中大招（货）[2022]1092号   \n",
       "                                     1            中大招（货）[2022]1092号   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1             中大招（货）[2022]223号   \n",
       "                                     1             中大招（货）[2022]223号   \n",
       "...                                                             ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1            中大招（货）[2022]1276号   \n",
       "                                     1            中大招（货）[2022]1276号   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1             中大招（货）[2022]849号   \n",
       "                                     1             中大招（货）[2022]849号   \n",
       "                                     1             中大招（货）[2022]849号   \n",
       "\n",
       "                                                                       project_name_x  \\\n",
       "stpr_id                              bundle_code                                        \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "                                     1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "                                     1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                  中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目   \n",
       "                                     1                  中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目   \n",
       "...                                                                               ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "                                     1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1            中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "                                     1            中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "                                     1            中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "\n",
       "                                                  project_money  \\\n",
       "stpr_id                              bundle_code                  \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                2080000.0   \n",
       "                                     1                2080000.0   \n",
       "                                     1                2080000.0   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                4275000.0   \n",
       "                                     1                4275000.0   \n",
       "...                                                         ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                1720000.0   \n",
       "                                     1                1720000.0   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                2600000.0   \n",
       "                                     1                2600000.0   \n",
       "                                     1                2600000.0   \n",
       "\n",
       "                                                 specie_type_name  \\\n",
       "stpr_id                              bundle_code                    \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                        货物类   \n",
       "                                     1                        货物类   \n",
       "                                     1                        货物类   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                        货物类   \n",
       "                                     1                        货物类   \n",
       "...                                                           ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                        货物类   \n",
       "                                     1                        货物类   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                        货物类   \n",
       "                                     1                        货物类   \n",
       "                                     1                        货物类   \n",
       "\n",
       "                                                                       project_name_y  \\\n",
       "stpr_id                              bundle_code                                        \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "                                     1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "                                     1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                  中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目   \n",
       "                                     1                  中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目   \n",
       "...                                                                               ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "                                     1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1            中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "                                     1            中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "                                     1            中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "\n",
       "                                                     project_code_y  \\\n",
       "stpr_id                              bundle_code                      \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            中大招（货）[2022]1092号   \n",
       "                                     1            中大招（货）[2022]1092号   \n",
       "                                     1            中大招（货）[2022]1092号   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1             中大招（货）[2022]223号   \n",
       "                                     1             中大招（货）[2022]223号   \n",
       "...                                                             ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1            中大招（货）[2022]1276号   \n",
       "                                     1            中大招（货）[2022]1276号   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1             中大招（货）[2022]849号   \n",
       "                                     1             中大招（货）[2022]849号   \n",
       "                                     1             中大招（货）[2022]849号   \n",
       "\n",
       "                                                    supply_name  \\\n",
       "stpr_id                              bundle_code                  \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            广州格卢瑞生命科学有限公司   \n",
       "                                     1            深圳市贝克生物科技有限公司   \n",
       "                                     1             广州睿贝医学科技有限公司   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1             湖南矩阵电子科技有限公司   \n",
       "                                     1            北京航天河科技发展有限公司   \n",
       "...                                                         ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1               广州大苗科技有限公司   \n",
       "                                     1             广东省中科进出口有限公司   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1            北京实创德激光科技有限公司   \n",
       "                                     1            宁波宏太科真空科技有限公司   \n",
       "                                     1               北京维开科技有限公司   \n",
       "\n",
       "                                                      good_name  \\\n",
       "stpr_id                              bundle_code                  \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            数字病理玻片扫描仪（荧光）   \n",
       "                                     1                  Panovue   \n",
       "                                     1            数字病理玻片扫描仪（荧光)   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                     矩阵电子   \n",
       "                                     1                       宇焕   \n",
       "...                                                         ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                     凌视科技   \n",
       "                                     1                  Luminex   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                    北京实创德   \n",
       "                                     1            宁波宏太科真空科技有限公司   \n",
       "                                     1                   磁控溅射系统   \n",
       "\n",
       "                                                        makeFactory  amount  \\\n",
       "stpr_id                              bundle_code                              \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1             徕卡显微系统（上海）贸易有限公司     1.0   \n",
       "                                     1             佰诺全景生物技术（北京）有限公司     1.0   \n",
       "                                     1               宁波江丰生物信息技术有限公司     1.0   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                 湖南矩阵电子科技有限公司    30.0   \n",
       "                                     1                北京航天河科技发展有限公司    30.0   \n",
       "...                                                             ...     ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                   天津凌视科技有限公司     1.0   \n",
       "                                     1            Luminex Corporate     1.0   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                北京实创德激光科技有限公司     1.0   \n",
       "                                     1                宁波宏太科真空科技有限公司     1.0   \n",
       "                                     1                   北京维开科技有限公司     1.0   \n",
       "\n",
       "                                                                                               spec  \\\n",
       "stpr_id                              bundle_code                                                      \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                                             Aperio Versa 200   \n",
       "                                     1                                                       PD One   \n",
       "                                     1                                                    KF-FL-120   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1            GNS-YZ100/GNS8110/GNS7632/GNS-JS210/GNS-ZH400/...   \n",
       "                                     1              HTH1001、HTH2010、HTH3002、HTH4010、HTH4020、HTH4030   \n",
       "...                                                                                             ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                                                      VS10000   \n",
       "                                     1                                                   Cellstream   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                                                    SCD01A-01   \n",
       "                                     1                                                  HCKJ-620-A型   \n",
       "                                     1                                                         M600   \n",
       "\n",
       "                                                  bid_quote  \n",
       "stpr_id                              bundle_code             \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            2076800.0  \n",
       "                                     1            2079000.0  \n",
       "                                     1            2078500.0  \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1            4212500.0  \n",
       "                                     1            4154000.0  \n",
       "...                                                     ...  \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1            1715800.0  \n",
       "                                     1            1711500.0  \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1            2598000.0  \n",
       "                                     1            2600000.0  \n",
       "                                     1            2595000.0  \n",
       "\n",
       "[9092 rows x 12 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 把 project 和投标表合并\n",
    "\n",
    "bidProject = pd.merge(projectInfo,bidInfo,on=['stpr_id','bundle_code'],how='left')\n",
    "bidProject"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "61aa98bb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>project_code_x</th>\n",
       "      <th>project_name_x</th>\n",
       "      <th>project_money</th>\n",
       "      <th>specie_type_name</th>\n",
       "      <th>project_name_y</th>\n",
       "      <th>project_code_y</th>\n",
       "      <th>supply_name</th>\n",
       "      <th>good_name</th>\n",
       "      <th>makeFactory</th>\n",
       "      <th>amount</th>\n",
       "      <th>spec</th>\n",
       "      <th>bid_quote</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stpr_id</th>\n",
       "      <th>bundle_code</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">16aebe0a-1bdf-4022-b2bf-0284c1a18423</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>2080000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>广州格卢瑞生命科学有限公司</td>\n",
       "      <td>数字病理玻片扫描仪（荧光）</td>\n",
       "      <td>徕卡显微系统（上海）贸易有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>Aperio Versa 200</td>\n",
       "      <td>2076800.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>2080000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>深圳市贝克生物科技有限公司</td>\n",
       "      <td>Panovue</td>\n",
       "      <td>佰诺全景生物技术（北京）有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>PD One</td>\n",
       "      <td>2079000.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>2080000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>广州睿贝医学科技有限公司</td>\n",
       "      <td>数字病理玻片扫描仪（荧光)</td>\n",
       "      <td>宁波江丰生物信息技术有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>KF-FL-120</td>\n",
       "      <td>2078500.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">f7e67994-24a7-470c-8c8c-2bb14d4447e9</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]223号</td>\n",
       "      <td>中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目</td>\n",
       "      <td>4275000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目</td>\n",
       "      <td>中大招（货）[2022]223号</td>\n",
       "      <td>湖南矩阵电子科技有限公司</td>\n",
       "      <td>矩阵电子</td>\n",
       "      <td>湖南矩阵电子科技有限公司</td>\n",
       "      <td>30.0</td>\n",
       "      <td>GNS-YZ100/GNS8110/GNS7632/GNS-JS210/GNS-ZH400/...</td>\n",
       "      <td>4212500.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]223号</td>\n",
       "      <td>中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目</td>\n",
       "      <td>4275000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目</td>\n",
       "      <td>中大招（货）[2022]223号</td>\n",
       "      <td>北京航天河科技发展有限公司</td>\n",
       "      <td>宇焕</td>\n",
       "      <td>北京航天河科技发展有限公司</td>\n",
       "      <td>30.0</td>\n",
       "      <td>HTH1001、HTH2010、HTH3002、HTH4010、HTH4020、HTH4030</td>\n",
       "      <td>4154000.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">f87ef8ce-8552-4c2f-bb71-9d39309e847b</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>1720000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>广州采和电子商务有限公司</td>\n",
       "      <td>Bio-Rad</td>\n",
       "      <td>Bio-Rad</td>\n",
       "      <td>1.0</td>\n",
       "      <td>ZE5</td>\n",
       "      <td>1718000.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>1720000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>广州大苗科技有限公司</td>\n",
       "      <td>凌视科技</td>\n",
       "      <td>天津凌视科技有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>VS10000</td>\n",
       "      <td>1715800.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>1720000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>广东省中科进出口有限公司</td>\n",
       "      <td>Luminex</td>\n",
       "      <td>Luminex Corporate</td>\n",
       "      <td>1.0</td>\n",
       "      <td>Cellstream</td>\n",
       "      <td>1711500.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">366b7281-a8fd-4a2c-b895-fba8af4f4200</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>2600000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>北京实创德激光科技有限公司</td>\n",
       "      <td>北京实创德</td>\n",
       "      <td>北京实创德激光科技有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>SCD01A-01</td>\n",
       "      <td>2598000.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>2600000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>北京维开科技有限公司</td>\n",
       "      <td>磁控溅射系统</td>\n",
       "      <td>北京维开科技有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>M600</td>\n",
       "      <td>2595000.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>7787 rows × 12 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                     project_code_x  \\\n",
       "stpr_id                              bundle_code                      \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            中大招（货）[2022]1092号   \n",
       "                                     1            中大招（货）[2022]1092号   \n",
       "                                     1            中大招（货）[2022]1092号   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1             中大招（货）[2022]223号   \n",
       "                                     1             中大招（货）[2022]223号   \n",
       "...                                                             ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1            中大招（货）[2022]1276号   \n",
       "                                     1            中大招（货）[2022]1276号   \n",
       "                                     1            中大招（货）[2022]1276号   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1             中大招（货）[2022]849号   \n",
       "                                     1             中大招（货）[2022]849号   \n",
       "\n",
       "                                                                       project_name_x  \\\n",
       "stpr_id                              bundle_code                                        \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "                                     1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "                                     1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                  中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目   \n",
       "                                     1                  中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目   \n",
       "...                                                                               ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "                                     1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "                                     1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1            中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "                                     1            中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "\n",
       "                                                  project_money  \\\n",
       "stpr_id                              bundle_code                  \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                2080000.0   \n",
       "                                     1                2080000.0   \n",
       "                                     1                2080000.0   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                4275000.0   \n",
       "                                     1                4275000.0   \n",
       "...                                                         ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                1720000.0   \n",
       "                                     1                1720000.0   \n",
       "                                     1                1720000.0   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                2600000.0   \n",
       "                                     1                2600000.0   \n",
       "\n",
       "                                                 specie_type_name  \\\n",
       "stpr_id                              bundle_code                    \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                        货物类   \n",
       "                                     1                        货物类   \n",
       "                                     1                        货物类   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                        货物类   \n",
       "                                     1                        货物类   \n",
       "...                                                           ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                        货物类   \n",
       "                                     1                        货物类   \n",
       "                                     1                        货物类   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                        货物类   \n",
       "                                     1                        货物类   \n",
       "\n",
       "                                                                       project_name_y  \\\n",
       "stpr_id                              bundle_code                                        \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "                                     1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "                                     1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                  中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目   \n",
       "                                     1                  中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目   \n",
       "...                                                                               ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "                                     1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "                                     1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1            中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "                                     1            中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "\n",
       "                                                     project_code_y  \\\n",
       "stpr_id                              bundle_code                      \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            中大招（货）[2022]1092号   \n",
       "                                     1            中大招（货）[2022]1092号   \n",
       "                                     1            中大招（货）[2022]1092号   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1             中大招（货）[2022]223号   \n",
       "                                     1             中大招（货）[2022]223号   \n",
       "...                                                             ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1            中大招（货）[2022]1276号   \n",
       "                                     1            中大招（货）[2022]1276号   \n",
       "                                     1            中大招（货）[2022]1276号   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1             中大招（货）[2022]849号   \n",
       "                                     1             中大招（货）[2022]849号   \n",
       "\n",
       "                                                    supply_name  \\\n",
       "stpr_id                              bundle_code                  \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            广州格卢瑞生命科学有限公司   \n",
       "                                     1            深圳市贝克生物科技有限公司   \n",
       "                                     1             广州睿贝医学科技有限公司   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1             湖南矩阵电子科技有限公司   \n",
       "                                     1            北京航天河科技发展有限公司   \n",
       "...                                                         ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1             广州采和电子商务有限公司   \n",
       "                                     1               广州大苗科技有限公司   \n",
       "                                     1             广东省中科进出口有限公司   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1            北京实创德激光科技有限公司   \n",
       "                                     1               北京维开科技有限公司   \n",
       "\n",
       "                                                      good_name  \\\n",
       "stpr_id                              bundle_code                  \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            数字病理玻片扫描仪（荧光）   \n",
       "                                     1                  Panovue   \n",
       "                                     1            数字病理玻片扫描仪（荧光)   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                     矩阵电子   \n",
       "                                     1                       宇焕   \n",
       "...                                                         ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                  Bio-Rad   \n",
       "                                     1                     凌视科技   \n",
       "                                     1                  Luminex   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                    北京实创德   \n",
       "                                     1                   磁控溅射系统   \n",
       "\n",
       "                                                        makeFactory  amount  \\\n",
       "stpr_id                              bundle_code                              \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1             徕卡显微系统（上海）贸易有限公司     1.0   \n",
       "                                     1             佰诺全景生物技术（北京）有限公司     1.0   \n",
       "                                     1               宁波江丰生物信息技术有限公司     1.0   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                 湖南矩阵电子科技有限公司    30.0   \n",
       "                                     1                北京航天河科技发展有限公司    30.0   \n",
       "...                                                             ...     ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                      Bio-Rad     1.0   \n",
       "                                     1                   天津凌视科技有限公司     1.0   \n",
       "                                     1            Luminex Corporate     1.0   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                北京实创德激光科技有限公司     1.0   \n",
       "                                     1                   北京维开科技有限公司     1.0   \n",
       "\n",
       "                                                                                               spec  \\\n",
       "stpr_id                              bundle_code                                                      \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                                             Aperio Versa 200   \n",
       "                                     1                                                       PD One   \n",
       "                                     1                                                    KF-FL-120   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1            GNS-YZ100/GNS8110/GNS7632/GNS-JS210/GNS-ZH400/...   \n",
       "                                     1              HTH1001、HTH2010、HTH3002、HTH4010、HTH4020、HTH4030   \n",
       "...                                                                                             ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                                                          ZE5   \n",
       "                                     1                                                      VS10000   \n",
       "                                     1                                                   Cellstream   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                                                    SCD01A-01   \n",
       "                                     1                                                         M600   \n",
       "\n",
       "                                                  bid_quote  \n",
       "stpr_id                              bundle_code             \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            2076800.0  \n",
       "                                     1            2079000.0  \n",
       "                                     1            2078500.0  \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1            4212500.0  \n",
       "                                     1            4154000.0  \n",
       "...                                                     ...  \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1            1718000.0  \n",
       "                                     1            1715800.0  \n",
       "                                     1            1711500.0  \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1            2598000.0  \n",
       "                                     1            2595000.0  \n",
       "\n",
       "[7787 rows x 12 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tmp = bidProject.query('project_money>bid_quote')\n",
    "tmp"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "954861e8",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Administrator\\AppData\\Local\\Temp\\ipykernel_23020\\1976805506.py:6: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  tmp['outRank']= round(p,2)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>project_code_x</th>\n",
       "      <th>project_name_x</th>\n",
       "      <th>project_money</th>\n",
       "      <th>specie_type_name</th>\n",
       "      <th>project_name_y</th>\n",
       "      <th>project_code_y</th>\n",
       "      <th>supply_name</th>\n",
       "      <th>good_name</th>\n",
       "      <th>makeFactory</th>\n",
       "      <th>amount</th>\n",
       "      <th>spec</th>\n",
       "      <th>bid_quote</th>\n",
       "      <th>outRank</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stpr_id</th>\n",
       "      <th>bundle_code</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">16aebe0a-1bdf-4022-b2bf-0284c1a18423</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>2080000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>广州格卢瑞生命科学有限公司</td>\n",
       "      <td>数字病理玻片扫描仪（荧光）</td>\n",
       "      <td>徕卡显微系统（上海）贸易有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>Aperio Versa 200</td>\n",
       "      <td>2076800.0</td>\n",
       "      <td>-0.15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>2080000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>深圳市贝克生物科技有限公司</td>\n",
       "      <td>Panovue</td>\n",
       "      <td>佰诺全景生物技术（北京）有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>PD One</td>\n",
       "      <td>2079000.0</td>\n",
       "      <td>-0.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>2080000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>广州睿贝医学科技有限公司</td>\n",
       "      <td>数字病理玻片扫描仪（荧光)</td>\n",
       "      <td>宁波江丰生物信息技术有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>KF-FL-120</td>\n",
       "      <td>2078500.0</td>\n",
       "      <td>-0.07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">f7e67994-24a7-470c-8c8c-2bb14d4447e9</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]223号</td>\n",
       "      <td>中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目</td>\n",
       "      <td>4275000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目</td>\n",
       "      <td>中大招（货）[2022]223号</td>\n",
       "      <td>湖南矩阵电子科技有限公司</td>\n",
       "      <td>矩阵电子</td>\n",
       "      <td>湖南矩阵电子科技有限公司</td>\n",
       "      <td>30.0</td>\n",
       "      <td>GNS-YZ100/GNS8110/GNS7632/GNS-JS210/GNS-ZH400/...</td>\n",
       "      <td>4212500.0</td>\n",
       "      <td>-1.46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]223号</td>\n",
       "      <td>中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目</td>\n",
       "      <td>4275000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目</td>\n",
       "      <td>中大招（货）[2022]223号</td>\n",
       "      <td>北京航天河科技发展有限公司</td>\n",
       "      <td>宇焕</td>\n",
       "      <td>北京航天河科技发展有限公司</td>\n",
       "      <td>30.0</td>\n",
       "      <td>HTH1001、HTH2010、HTH3002、HTH4010、HTH4020、HTH4030</td>\n",
       "      <td>4154000.0</td>\n",
       "      <td>-2.83</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">f87ef8ce-8552-4c2f-bb71-9d39309e847b</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>1720000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>广州采和电子商务有限公司</td>\n",
       "      <td>Bio-Rad</td>\n",
       "      <td>Bio-Rad</td>\n",
       "      <td>1.0</td>\n",
       "      <td>ZE5</td>\n",
       "      <td>1718000.0</td>\n",
       "      <td>-0.12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>1720000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>广州大苗科技有限公司</td>\n",
       "      <td>凌视科技</td>\n",
       "      <td>天津凌视科技有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>VS10000</td>\n",
       "      <td>1715800.0</td>\n",
       "      <td>-0.24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>1720000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>广东省中科进出口有限公司</td>\n",
       "      <td>Luminex</td>\n",
       "      <td>Luminex Corporate</td>\n",
       "      <td>1.0</td>\n",
       "      <td>Cellstream</td>\n",
       "      <td>1711500.0</td>\n",
       "      <td>-0.49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">366b7281-a8fd-4a2c-b895-fba8af4f4200</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>2600000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>北京实创德激光科技有限公司</td>\n",
       "      <td>北京实创德</td>\n",
       "      <td>北京实创德激光科技有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>SCD01A-01</td>\n",
       "      <td>2598000.0</td>\n",
       "      <td>-0.08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>2600000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>北京维开科技有限公司</td>\n",
       "      <td>磁控溅射系统</td>\n",
       "      <td>北京维开科技有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>M600</td>\n",
       "      <td>2595000.0</td>\n",
       "      <td>-0.19</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>7787 rows × 13 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                     project_code_x  \\\n",
       "stpr_id                              bundle_code                      \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            中大招（货）[2022]1092号   \n",
       "                                     1            中大招（货）[2022]1092号   \n",
       "                                     1            中大招（货）[2022]1092号   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1             中大招（货）[2022]223号   \n",
       "                                     1             中大招（货）[2022]223号   \n",
       "...                                                             ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1            中大招（货）[2022]1276号   \n",
       "                                     1            中大招（货）[2022]1276号   \n",
       "                                     1            中大招（货）[2022]1276号   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1             中大招（货）[2022]849号   \n",
       "                                     1             中大招（货）[2022]849号   \n",
       "\n",
       "                                                                       project_name_x  \\\n",
       "stpr_id                              bundle_code                                        \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "                                     1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "                                     1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                  中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目   \n",
       "                                     1                  中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目   \n",
       "...                                                                               ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "                                     1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "                                     1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1            中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "                                     1            中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "\n",
       "                                                  project_money  \\\n",
       "stpr_id                              bundle_code                  \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                2080000.0   \n",
       "                                     1                2080000.0   \n",
       "                                     1                2080000.0   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                4275000.0   \n",
       "                                     1                4275000.0   \n",
       "...                                                         ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                1720000.0   \n",
       "                                     1                1720000.0   \n",
       "                                     1                1720000.0   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                2600000.0   \n",
       "                                     1                2600000.0   \n",
       "\n",
       "                                                 specie_type_name  \\\n",
       "stpr_id                              bundle_code                    \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                        货物类   \n",
       "                                     1                        货物类   \n",
       "                                     1                        货物类   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                        货物类   \n",
       "                                     1                        货物类   \n",
       "...                                                           ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                        货物类   \n",
       "                                     1                        货物类   \n",
       "                                     1                        货物类   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                        货物类   \n",
       "                                     1                        货物类   \n",
       "\n",
       "                                                                       project_name_y  \\\n",
       "stpr_id                              bundle_code                                        \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "                                     1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "                                     1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                  中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目   \n",
       "                                     1                  中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目   \n",
       "...                                                                               ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "                                     1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "                                     1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1            中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "                                     1            中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "\n",
       "                                                     project_code_y  \\\n",
       "stpr_id                              bundle_code                      \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            中大招（货）[2022]1092号   \n",
       "                                     1            中大招（货）[2022]1092号   \n",
       "                                     1            中大招（货）[2022]1092号   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1             中大招（货）[2022]223号   \n",
       "                                     1             中大招（货）[2022]223号   \n",
       "...                                                             ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1            中大招（货）[2022]1276号   \n",
       "                                     1            中大招（货）[2022]1276号   \n",
       "                                     1            中大招（货）[2022]1276号   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1             中大招（货）[2022]849号   \n",
       "                                     1             中大招（货）[2022]849号   \n",
       "\n",
       "                                                    supply_name  \\\n",
       "stpr_id                              bundle_code                  \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            广州格卢瑞生命科学有限公司   \n",
       "                                     1            深圳市贝克生物科技有限公司   \n",
       "                                     1             广州睿贝医学科技有限公司   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1             湖南矩阵电子科技有限公司   \n",
       "                                     1            北京航天河科技发展有限公司   \n",
       "...                                                         ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1             广州采和电子商务有限公司   \n",
       "                                     1               广州大苗科技有限公司   \n",
       "                                     1             广东省中科进出口有限公司   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1            北京实创德激光科技有限公司   \n",
       "                                     1               北京维开科技有限公司   \n",
       "\n",
       "                                                      good_name  \\\n",
       "stpr_id                              bundle_code                  \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            数字病理玻片扫描仪（荧光）   \n",
       "                                     1                  Panovue   \n",
       "                                     1            数字病理玻片扫描仪（荧光)   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                     矩阵电子   \n",
       "                                     1                       宇焕   \n",
       "...                                                         ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                  Bio-Rad   \n",
       "                                     1                     凌视科技   \n",
       "                                     1                  Luminex   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                    北京实创德   \n",
       "                                     1                   磁控溅射系统   \n",
       "\n",
       "                                                        makeFactory  amount  \\\n",
       "stpr_id                              bundle_code                              \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1             徕卡显微系统（上海）贸易有限公司     1.0   \n",
       "                                     1             佰诺全景生物技术（北京）有限公司     1.0   \n",
       "                                     1               宁波江丰生物信息技术有限公司     1.0   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                 湖南矩阵电子科技有限公司    30.0   \n",
       "                                     1                北京航天河科技发展有限公司    30.0   \n",
       "...                                                             ...     ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                      Bio-Rad     1.0   \n",
       "                                     1                   天津凌视科技有限公司     1.0   \n",
       "                                     1            Luminex Corporate     1.0   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                北京实创德激光科技有限公司     1.0   \n",
       "                                     1                   北京维开科技有限公司     1.0   \n",
       "\n",
       "                                                                                               spec  \\\n",
       "stpr_id                              bundle_code                                                      \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                                             Aperio Versa 200   \n",
       "                                     1                                                       PD One   \n",
       "                                     1                                                    KF-FL-120   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1            GNS-YZ100/GNS8110/GNS7632/GNS-JS210/GNS-ZH400/...   \n",
       "                                     1              HTH1001、HTH2010、HTH3002、HTH4010、HTH4020、HTH4030   \n",
       "...                                                                                             ...   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                                                          ZE5   \n",
       "                                     1                                                      VS10000   \n",
       "                                     1                                                   Cellstream   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                                                    SCD01A-01   \n",
       "                                     1                                                         M600   \n",
       "\n",
       "                                                  bid_quote  outRank  \n",
       "stpr_id                              bundle_code                      \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            2076800.0    -0.15  \n",
       "                                     1            2079000.0    -0.05  \n",
       "                                     1            2078500.0    -0.07  \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1            4212500.0    -1.46  \n",
       "                                     1            4154000.0    -2.83  \n",
       "...                                                     ...      ...  \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1            1718000.0    -0.12  \n",
       "                                     1            1715800.0    -0.24  \n",
       "                                     1            1711500.0    -0.49  \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1            2598000.0    -0.08  \n",
       "                                     1            2595000.0    -0.19  \n",
       "\n",
       "[7787 rows x 13 columns]"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# add()  sub()  mul()  div()\n",
    "#   +      -      *      /\n",
    "\n",
    "p = tmp['bid_quote'].sub(tmp['project_money']).div(tmp['project_money']).mul(100)\n",
    "\n",
    "tmp['outRank']= round(p,2)\n",
    "tmp"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "32a89897",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "good_name\n",
      "makeFactory\n",
      "amount\n",
      "spec\n"
     ]
    }
   ],
   "source": [
    "# np.any(pd.isnull(tmp))\n",
    "# 打印有空值的列\n",
    "for i in tmp.columns:\n",
    "    if np.any(pd.isnull(tmp[i])) ==True:\n",
    "        print(i)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "3775cc24",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\Administrator\\AppData\\Local\\Temp\\ipykernel_23020\\3773801257.py:1: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  tmp['good_name'].fillna(' ', inplace=True)\n",
      "C:\\Users\\Administrator\\AppData\\Local\\Temp\\ipykernel_23020\\3773801257.py:2: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  tmp['makeFactory'].fillna(' ', inplace=True)\n",
      "C:\\Users\\Administrator\\AppData\\Local\\Temp\\ipykernel_23020\\3773801257.py:3: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  tmp['spec'].fillna(' ', inplace=True)\n",
      "C:\\Users\\Administrator\\AppData\\Local\\Temp\\ipykernel_23020\\3773801257.py:4: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  tmp['amount'].fillna(-1, inplace=True)\n"
     ]
    }
   ],
   "source": [
    "tmp['good_name'].fillna(' ', inplace=True)\n",
    "tmp['makeFactory'].fillna(' ', inplace=True)\n",
    "tmp['spec'].fillna(' ', inplace=True)\n",
    "tmp['amount'].fillna(-1, inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "a7a6d1b0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.any(pd.isnull(tmp))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "f58b6589",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "stpr_id                               bundle_code\n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423  1             -0.15\n",
       "                                      1             -0.05\n",
       "                                      1             -0.07\n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9  1             -1.46\n",
       "                                      1             -2.83\n",
       "                                                     ... \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b  1             -0.12\n",
       "                                      1             -0.24\n",
       "                                      1             -0.49\n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200  1             -0.08\n",
       "                                      1             -0.19\n",
       "Name: outRank, Length: 7787, dtype: float64"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tmp['outRank']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "e2f8b1e5",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "outRank\n",
       "(-20, -15]     2841\n",
       "(-1, 0]        1760\n",
       "(-3, -1]        954\n",
       "(-15, -10]      695\n",
       "(-50, -20]      455\n",
       "(-10, -5]       423\n",
       "(-5, -3]        224\n",
       "(-100, -50]     142\n",
       "Name: count, dtype: int64"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 只有一维数组才能切片，数据需要降维\n",
    "\n",
    "level = [-100,-50,-20,-15,-10,-5,-3,-1,0]\n",
    "pd.cut(tmp['outRank'],level).value_counts()\n",
    "\n",
    "# pd.qcut(tmp['outRank'],20).value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "id": "6563e641",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>project_code_x</th>\n",
       "      <th>project_name_x</th>\n",
       "      <th>project_money</th>\n",
       "      <th>specie_type_name</th>\n",
       "      <th>project_name_y</th>\n",
       "      <th>project_code_y</th>\n",
       "      <th>supply_name</th>\n",
       "      <th>good_name</th>\n",
       "      <th>makeFactory</th>\n",
       "      <th>amount</th>\n",
       "      <th>spec</th>\n",
       "      <th>bid_quote</th>\n",
       "      <th>outRank</th>\n",
       "      <th>ranking</th>\n",
       "      <th>flag</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>stpr_id</th>\n",
       "      <th>bundle_code</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>16aebe0a-1bdf-4022-b2bf-0284c1a18423</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>2080000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学医学院数字病理玻片扫描仪（荧光）采购项目</td>\n",
       "      <td>中大招（货）[2022]1092号</td>\n",
       "      <td>广州睿贝医学科技有限公司</td>\n",
       "      <td>数字病理玻片扫描仪（荧光)</td>\n",
       "      <td>宁波江丰生物信息技术有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>KF-FL-120</td>\n",
       "      <td>2078500.00</td>\n",
       "      <td>-0.07</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>f7e67994-24a7-470c-8c8c-2bb14d4447e9</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]223号</td>\n",
       "      <td>中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目</td>\n",
       "      <td>4275000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目</td>\n",
       "      <td>中大招（货）[2022]223号</td>\n",
       "      <td>北京航天河科技发展有限公司</td>\n",
       "      <td>宇焕</td>\n",
       "      <td>北京航天河科技发展有限公司</td>\n",
       "      <td>30.0</td>\n",
       "      <td>HTH1001、HTH2010、HTH3002、HTH4010、HTH4020、HTH4030</td>\n",
       "      <td>4154000.00</td>\n",
       "      <td>-2.83</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>dcca20ed-4aea-4b4f-befe-188f226945c7</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1045号</td>\n",
       "      <td>中山大学大气科学学院比较行星学综合观测平台：1米口径望远镜采购项目</td>\n",
       "      <td>6620000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学大气科学学院比较行星学综合观测平台：1米口径望远镜采购项目</td>\n",
       "      <td>中大招（货）[2022]1045号</td>\n",
       "      <td>深圳市宝应电子有限公司</td>\n",
       "      <td>Astelco</td>\n",
       "      <td>Astelco Systems GmbH</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1m Alt-Az Telescope</td>\n",
       "      <td>6597144.00</td>\n",
       "      <td>-0.35</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20153f94-a8ed-4726-ae45-209db635c34b</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2023]124号</td>\n",
       "      <td>中山大学广州校区南校园与东校园教学楼空调更换采购项目</td>\n",
       "      <td>2212900.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学广州校区南校园与东校园教学楼空调更换采购项目</td>\n",
       "      <td>中大招（货）[2023]124号</td>\n",
       "      <td>广州汉能制冷技术有限公司</td>\n",
       "      <td>美的</td>\n",
       "      <td>广东美的制冷设备有限公司</td>\n",
       "      <td>8.0</td>\n",
       "      <td>MDV-400W/D2SN1-8U3(I)</td>\n",
       "      <td>1367189.00</td>\n",
       "      <td>-38.22</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39a25800-7e53-4183-99ef-74c2c0ab12fa</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1162号</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）光电材料刻蚀设备采购项目</td>\n",
       "      <td>14370000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）光电材料刻蚀设备采购项目</td>\n",
       "      <td>中大招（货）[2022]1162号</td>\n",
       "      <td>中国医药保健品有限公司</td>\n",
       "      <td>Oxford Instruments/Tousimis</td>\n",
       "      <td>牛津仪器科技（上海）有限公司/Tousimis Research Corporation, ...</td>\n",
       "      <td>4.0</td>\n",
       "      <td>PlasmaPro 100 Cobra/AUTOMEGASAMDRI-938, Series C</td>\n",
       "      <td>14330000.00</td>\n",
       "      <td>-0.28</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>00da2de8-cd86-4b39-973f-589bbb92d6ce</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]927号</td>\n",
       "      <td>中山大学材料学院超高温综合热分析仪采购项目</td>\n",
       "      <td>1850000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学材料学院超高温综合热分析仪采购项目</td>\n",
       "      <td>中大招（货）[2022]927号</td>\n",
       "      <td>广州市晞灵国际贸易有限公司</td>\n",
       "      <td>法国塞塔拉姆（SETARAM）</td>\n",
       "      <td>KEP Technologies EMEA</td>\n",
       "      <td>1.0</td>\n",
       "      <td>THEMYS</td>\n",
       "      <td>1849600.00</td>\n",
       "      <td>-0.02</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>afa4fc62-ba82-40f7-b314-8b3a11f4693e</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1346号</td>\n",
       "      <td>中山大学化学学院超高效液相色谱-三重四极杆质谱联用仪采购项目</td>\n",
       "      <td>2500000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学化学学院超高效液相色谱-三重四极杆质谱联用仪采购项目</td>\n",
       "      <td>中大招（货）[2022]1346号</td>\n",
       "      <td>广州广电国际商贸有限公司</td>\n",
       "      <td>安捷伦</td>\n",
       "      <td>安捷伦科技有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1290 Infinity II-6475</td>\n",
       "      <td>2498000.00</td>\n",
       "      <td>-0.08</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>0e6bdb27-3de0-464f-a26e-44e251bc20b1</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]162号</td>\n",
       "      <td>中山大学2022年南校园部分学生宿舍热水系统维修更换采购项目</td>\n",
       "      <td>1477013.8</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学2022年南校园部分学生宿舍热水系统维修更换采购项目</td>\n",
       "      <td>中大招（货）[2022]162号</td>\n",
       "      <td>广州诚源科技发展有限公司</td>\n",
       "      <td>普瑞思顿</td>\n",
       "      <td>广东瑞星新能源科技有限公司</td>\n",
       "      <td>9.0</td>\n",
       "      <td>LWH-100</td>\n",
       "      <td>1128777.56</td>\n",
       "      <td>-23.58</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>f87ef8ce-8552-4c2f-bb71-9d39309e847b</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>1720000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目</td>\n",
       "      <td>中大招（货）[2022]1276号</td>\n",
       "      <td>广东省中科进出口有限公司</td>\n",
       "      <td>Luminex</td>\n",
       "      <td>Luminex Corporate</td>\n",
       "      <td>1.0</td>\n",
       "      <td>Cellstream</td>\n",
       "      <td>1711500.00</td>\n",
       "      <td>-0.49</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>366b7281-a8fd-4a2c-b895-fba8af4f4200</th>\n",
       "      <th>1</th>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>2600000.0</td>\n",
       "      <td>货物类</td>\n",
       "      <td>中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目</td>\n",
       "      <td>中大招（货）[2022]849号</td>\n",
       "      <td>北京维开科技有限公司</td>\n",
       "      <td>磁控溅射系统</td>\n",
       "      <td>北京维开科技有限公司</td>\n",
       "      <td>1.0</td>\n",
       "      <td>M600</td>\n",
       "      <td>2595000.00</td>\n",
       "      <td>-0.19</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>993 rows × 15 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                     project_code_x  \\\n",
       "stpr_id                              bundle_code                      \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            中大招（货）[2022]1092号   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1             中大招（货）[2022]223号   \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1            中大招（货）[2022]1045号   \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1             中大招（货）[2023]124号   \n",
       "39a25800-7e53-4183-99ef-74c2c0ab12fa 1            中大招（货）[2022]1162号   \n",
       "...                                                             ...   \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1             中大招（货）[2022]927号   \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1            中大招（货）[2022]1346号   \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1             中大招（货）[2022]162号   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1            中大招（货）[2022]1276号   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1             中大招（货）[2022]849号   \n",
       "\n",
       "                                                                       project_name_x  \\\n",
       "stpr_id                              bundle_code                                        \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                  中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目   \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1              中山大学大气科学学院比较行星学综合观测平台：1米口径望远镜采购项目   \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1                     中山大学广州校区南校园与东校园教学楼空调更换采购项目   \n",
       "39a25800-7e53-4183-99ef-74c2c0ab12fa 1               中山大学电子与信息工程学院（微电子学院）光电材料刻蚀设备采购项目   \n",
       "...                                                                               ...   \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1                          中山大学材料学院超高温综合热分析仪采购项目   \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1                 中山大学化学学院超高效液相色谱-三重四极杆质谱联用仪采购项目   \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1                 中山大学2022年南校园部分学生宿舍热水系统维修更换采购项目   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1            中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "\n",
       "                                                  project_money  \\\n",
       "stpr_id                              bundle_code                  \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                2080000.0   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                4275000.0   \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1                6620000.0   \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1                2212900.0   \n",
       "39a25800-7e53-4183-99ef-74c2c0ab12fa 1               14370000.0   \n",
       "...                                                         ...   \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1                1850000.0   \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1                2500000.0   \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1                1477013.8   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                1720000.0   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                2600000.0   \n",
       "\n",
       "                                                 specie_type_name  \\\n",
       "stpr_id                              bundle_code                    \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                        货物类   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                        货物类   \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1                        货物类   \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1                        货物类   \n",
       "39a25800-7e53-4183-99ef-74c2c0ab12fa 1                        货物类   \n",
       "...                                                           ...   \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1                        货物类   \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1                        货物类   \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1                        货物类   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                        货物类   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                        货物类   \n",
       "\n",
       "                                                                       project_name_y  \\\n",
       "stpr_id                              bundle_code                                        \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                       中山大学医学院数字病理玻片扫描仪（荧光）采购项目   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                  中山大学电子与通信工程学院北斗导航创新实践平台设备采购项目   \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1              中山大学大气科学学院比较行星学综合观测平台：1米口径望远镜采购项目   \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1                     中山大学广州校区南校园与东校园教学楼空调更换采购项目   \n",
       "39a25800-7e53-4183-99ef-74c2c0ab12fa 1               中山大学电子与信息工程学院（微电子学院）光电材料刻蚀设备采购项目   \n",
       "...                                                                               ...   \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1                          中山大学材料学院超高温综合热分析仪采购项目   \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1                 中山大学化学学院超高效液相色谱-三重四极杆质谱联用仪采购项目   \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1                 中山大学2022年南校园部分学生宿舍热水系统维修更换采购项目   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                   中山大学环境科学与工程学院高功率多激光流式细胞仪采购项目   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1            中山大学电子与信息工程学院（微电子学院）高真空多靶磁控溅射系统采购项目   \n",
       "\n",
       "                                                     project_code_y  \\\n",
       "stpr_id                              bundle_code                      \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1            中大招（货）[2022]1092号   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1             中大招（货）[2022]223号   \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1            中大招（货）[2022]1045号   \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1             中大招（货）[2023]124号   \n",
       "39a25800-7e53-4183-99ef-74c2c0ab12fa 1            中大招（货）[2022]1162号   \n",
       "...                                                             ...   \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1             中大招（货）[2022]927号   \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1            中大招（货）[2022]1346号   \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1             中大招（货）[2022]162号   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1            中大招（货）[2022]1276号   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1             中大招（货）[2022]849号   \n",
       "\n",
       "                                                    supply_name  \\\n",
       "stpr_id                              bundle_code                  \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1             广州睿贝医学科技有限公司   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1            北京航天河科技发展有限公司   \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1              深圳市宝应电子有限公司   \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1             广州汉能制冷技术有限公司   \n",
       "39a25800-7e53-4183-99ef-74c2c0ab12fa 1              中国医药保健品有限公司   \n",
       "...                                                         ...   \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1            广州市晞灵国际贸易有限公司   \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1             广州广电国际商贸有限公司   \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1             广州诚源科技发展有限公司   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1             广东省中科进出口有限公司   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1               北京维开科技有限公司   \n",
       "\n",
       "                                                                    good_name  \\\n",
       "stpr_id                              bundle_code                                \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                          数字病理玻片扫描仪（荧光)   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                                     宇焕   \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1                                Astelco   \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1                                     美的   \n",
       "39a25800-7e53-4183-99ef-74c2c0ab12fa 1            Oxford Instruments/Tousimis   \n",
       "...                                                                       ...   \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1                        法国塞塔拉姆（SETARAM）   \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1                                    安捷伦   \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1                                   普瑞思顿   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                                Luminex   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                                 磁控溅射系统   \n",
       "\n",
       "                                                                                        makeFactory  \\\n",
       "stpr_id                              bundle_code                                                      \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                                               宁波江丰生物信息技术有限公司   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                                                北京航天河科技发展有限公司   \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1                                         Astelco Systems GmbH   \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1                                                 广东美的制冷设备有限公司   \n",
       "39a25800-7e53-4183-99ef-74c2c0ab12fa 1            牛津仪器科技（上海）有限公司/Tousimis Research Corporation, ...   \n",
       "...                                                                                             ...   \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1                                        KEP Technologies EMEA   \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1                                                    安捷伦科技有限公司   \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1                                                广东瑞星新能源科技有限公司   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                                            Luminex Corporate   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                                                   北京维开科技有限公司   \n",
       "\n",
       "                                                  amount  \\\n",
       "stpr_id                              bundle_code           \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1               1.0   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1              30.0   \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1               1.0   \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1               8.0   \n",
       "39a25800-7e53-4183-99ef-74c2c0ab12fa 1               4.0   \n",
       "...                                                  ...   \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1               1.0   \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1               1.0   \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1               9.0   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1               1.0   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1               1.0   \n",
       "\n",
       "                                                                                              spec  \\\n",
       "stpr_id                              bundle_code                                                     \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                                                   KF-FL-120   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1             HTH1001、HTH2010、HTH3002、HTH4010、HTH4020、HTH4030   \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1                                         1m Alt-Az Telescope   \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1                                       MDV-400W/D2SN1-8U3(I)   \n",
       "39a25800-7e53-4183-99ef-74c2c0ab12fa 1            PlasmaPro 100 Cobra/AUTOMEGASAMDRI-938, Series C   \n",
       "...                                                                                            ...   \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1                                                      THEMYS   \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1                                       1290 Infinity II-6475   \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1                                                     LWH-100   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                                                  Cellstream   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                                                        M600   \n",
       "\n",
       "                                                    bid_quote  outRank  \\\n",
       "stpr_id                              bundle_code                         \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1             2078500.00    -0.07   \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1             4154000.00    -2.83   \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1             6597144.00    -0.35   \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1             1367189.00   -38.22   \n",
       "39a25800-7e53-4183-99ef-74c2c0ab12fa 1            14330000.00    -0.28   \n",
       "...                                                       ...      ...   \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1             1849600.00    -0.02   \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1             2498000.00    -0.08   \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1             1128777.56   -23.58   \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1             1711500.00    -0.49   \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1             2595000.00    -0.19   \n",
       "\n",
       "                                                  ranking  flag  \n",
       "stpr_id                              bundle_code                 \n",
       "16aebe0a-1bdf-4022-b2bf-0284c1a18423 1                1.0   1.0  \n",
       "f7e67994-24a7-470c-8c8c-2bb14d4447e9 1                1.0   1.0  \n",
       "dcca20ed-4aea-4b4f-befe-188f226945c7 1                1.0   1.0  \n",
       "20153f94-a8ed-4726-ae45-209db635c34b 1                1.0   1.0  \n",
       "39a25800-7e53-4183-99ef-74c2c0ab12fa 1                1.0   1.0  \n",
       "...                                                   ...   ...  \n",
       "00da2de8-cd86-4b39-973f-589bbb92d6ce 1                1.0   1.0  \n",
       "afa4fc62-ba82-40f7-b314-8b3a11f4693e 1                1.0   1.0  \n",
       "0e6bdb27-3de0-464f-a26e-44e251bc20b1 1                1.0   1.0  \n",
       "f87ef8ce-8552-4c2f-bb71-9d39309e847b 1                1.0   1.0  \n",
       "366b7281-a8fd-4a2c-b895-fba8af4f4200 1                1.0   1.0  \n",
       "\n",
       "[993 rows x 15 columns]"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 合并评分表\n",
    "\n",
    "result = pd.merge(tmp,bidResult,on=['stpr_id','bundle_code','supply_name'],how='left')\n",
    "\n",
    "# bidProject.query('project_money>bid_quote')\n",
    "result = result.query('ranking==1 & flag==1')\n",
    "\n",
    "# 去重，因为在评分时，多位专家对同一个供应商评分排名相同时，会出现重复\n",
    "result = result.drop_duplicates()\n",
    "result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "54f407ce",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "outRank\n",
       "(-0.2, 0.0]        199\n",
       "(-2.0, -1.0]       112\n",
       "(-0.4, -0.2]        89\n",
       "(-10.0, -5.0]       74\n",
       "(-0.6, -0.4]        70\n",
       "(-3.0, -2.0]        65\n",
       "(-50.0, -20.0]      62\n",
       "(-15.0, -10.0]      59\n",
       "(-0.8, -0.6]        53\n",
       "(-20.0, -15.0]      49\n",
       "(-1.0, -0.8]        42\n",
       "(-4.0, -3.0]        33\n",
       "(-100.0, -50.0]     28\n",
       "(-5.0, -4.0]        25\n",
       "Name: count, dtype: int64"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 只有一维数组才能切片，数据需要降维\n",
    "\n",
    "level = [-100,-50,-20,-15,-10,-5,-4,-3,-2,-1,-0.8,-0.6,-0.4,-0.2,0]\n",
    "pd.cut(result['outRank'],level).value_counts()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
